package siyuan.run.nacos.sentinel;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: sy
 * @description:
 * @author: SY
 * @create: 2020-12-20 13:49
 **/
@SpringBootApplication
public class NacosSentinelApplication {

    public static void main(String[] args) {
        SpringApplication.run(NacosSentinelApplication.class,args);
    }

    @RestController
    class TestController {

        @GetMapping("/hello")
        @SentinelResource("hello")
        public String hello() {
            return "didispace.com";
        }

    }

}
